﻿using UnityEngine;
using System.Collections;
using UnityEditor;

namespace CircularScrollView
{

    [CustomEditor(typeof(CircularScrollView.ExpandCircularScrollView))]
    public class ExpandCircularScrollViewEditor : Editor
    {

        ExpandCircularScrollView list;
        public override void OnInspectorGUI()
        {
            list = (CircularScrollView.ExpandCircularScrollView)target;
            list.direction = (e_Direction)EditorGUILayout.EnumPopup("Direction: ", list.direction);

            list.row = EditorGUILayout.IntField("Row Or Column: ", list.row);
            list.spacing = EditorGUILayout.FloatField("Spacing: ", list.spacing);
            list.m_ExpandButton = (GameObject)EditorGUILayout.ObjectField("Cell: ", list.m_ExpandButton, typeof(GameObject), true);
            list.scrollViewCell = (ScrollViewCell)EditorGUILayout.ObjectField("ExpandCell: ", list.scrollViewCell, typeof(GameObject), true);
            list.m_IsExpand = EditorGUILayout.ToggleLeft(" isDefaultExpand", list.m_IsExpand);
            //list.m_BackgroundMargin = EditorGUILayout.FloatField("BackgroundScale：", list.m_BackgroundMargin);

            list.isShowArrow = EditorGUILayout.ToggleLeft(" IsShowArrow", list.isShowArrow);
            if (list.isShowArrow)
            {
                list.pointingFirstArrow = (GameObject)EditorGUILayout.ObjectField("Up or Left Arrow: ", list.pointingFirstArrow, typeof(GameObject), true);
                list.pointingEndArrow = (GameObject)EditorGUILayout.ObjectField("Down or Right Arrow: ", list.pointingEndArrow, typeof(GameObject), true);
            }
        }
    }
}
